import { createContext  } from 'react';
// 1. 定义初始值
const state = {
  email: 'test@example.com',
  mobile: '',
  role: 1,
  matches: [{
    path: '/index/home',
    name: '首页'
  }]
}
// 2. 创建一个context -> createContext(state),并导出 export
const userContext = createContext(state) as any
export {
  state,
  userContext
}
